package com.ktwlsoft.archivemanage.domain.dao.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.Size;

/**
 * account--账号
 *
 * @author zhuhe on 2019-10-24 14:19:38
 * @version 1.0
 */
@ApiModel("account--账号-Account")
@Getter
@Setter
public class Account extends BaseEntity {

    /**
     * 用户账号(不可重复)
     **/
    @ApiModelProperty("用户账号(不可重复)")
    @Size(max = 30, message = "用户账号(不可重复)参数超长")
    private String userName;

    /**
     * 真实姓名
     **/
    @ApiModelProperty("真实姓名")
    @Size(max = 30, message = "真实姓名参数超长")
    private String realName;

    /**
     * 手机号码(不可重复)
     **/
    @ApiModelProperty("手机号码(不可重复)")
    @Size(max = 30, message = "手机号码(不可重复)参数超长")
    private String teleNum;

    /**
     * 性别(1为男性，0为女性)
     **/
    @ApiModelProperty("性别(1为男性，0为女性)")
    private Boolean sex;

    /**
     * 邮箱(不可重复)
     **/
    @ApiModelProperty("邮箱(不可重复)")
    @Size(max = 50, message = "邮箱(不可重复)参数超长")
    private String email;

    /**
     * 角色Id
     **/
    @ApiModelProperty("角色Id")
    private Long roleId;

    /**
     * 角色名称
     **/
    @ApiModelProperty("角色名称")
    @Size(max = 30, message = "角色名称参数超长")
    private String roleName;

    /**
     * 部门id
     **/
    @ApiModelProperty("部门id")
    private Long departmentId;

    /**
     * 部门名称
     **/
    @ApiModelProperty("部门名称")
    @Size(max = 30, message = "部门名称参数超长")
    private String departmentName;

    /**
     * 账号状态(1启用，0禁用)
     **/
    @ApiModelProperty("账号状态(1启用，0禁用)")
    private Boolean enable;

    /**
     * 证件类型(IDCARD:身份证)
     **/
    @ApiModelProperty("证件类型(IDCARD:身份证)")
    @Size(max = 30, message = "证件类型(IDCARD:身份证)参数超长")
    private String identityType;

    /**
     * 证件号码
     **/
    @ApiModelProperty("证件号码")
    @Size(max = 50, message = "证件号码参数超长")
    private String identityNum;

    /**
     * 备注
     **/
    @ApiModelProperty("备注")
    @Size(max = 100, message = "备注参数超长")
    private String remark;

    /**
     * 密码
     **/
    @ApiModelProperty("密码")
    @Size(max = 50, message = "密码参数超长")
    private String password;

    /**
     * 头像
     **/
    @ApiModelProperty("头像")
    @Size(max = 100, message = "头像参数超长")
    private String profile;

    /**
     * 密码强度(0:弱,1:中,2:强)
     **/
    @ApiModelProperty("密码强度(0:弱,1:中,2:强)")
    private Integer passwordStrength;

    /**
     * 关键字
     */
    @ApiModelProperty("关键字")
    private String keyWords;

    /**
     * 用户（老师介绍）
     **/
    @ApiModelProperty("老师介绍")
    @Size(max = 300, message = "老师介绍参数超长")
    private String introduce;

    public Account(
            Long id,
            @Size(max = 30, message = "用户账号(不可重复)参数超长") String userName,
            @Size(max = 30, message = "真实姓名参数超长") String realName,
            @Size(max = 30, message = "手机号码(不可重复)参数超长") String teleNum,
            Boolean sex,
            @Size(max = 50, message = "邮箱(不可重复)参数超长") String email,
            Long roleId,
            @Size(max = 30, message = "角色名称参数超长") String roleName,
            Long departmentId,
            @Size(max = 30, message = "部门名称参数超长") String departmentName,
            @Size(max = 30, message = "证件类型(IDCARD:身份证)参数超长") String identityType,
            @Size(max = 50, message = "证件号码参数超长") String identityNum,
            @Size(max = 100, message = "备注参数超长") String remark,
            @Size(max = 300, message = "老师介绍参数超长") String introduce,
            @Size(max = 100, message = "头像参数超长") String profile) {
        setId(id);
        this.userName = userName;
        this.realName = realName;
        this.teleNum = teleNum;
        this.sex = sex;
        this.email = email;
        this.roleId = roleId;
        this.roleName = roleName;
        this.departmentId = departmentId;
        this.departmentName = departmentName;
        this.identityType = identityType;
        this.identityNum = identityNum;
        this.remark = remark;
        this.profile = profile;
        this.introduce = introduce;
    }

    public Account(@Size(max = 30, message = "用户账号(不可重复)参数超长") String userName, String realName) {
        this.userName = userName;
        this.realName = realName;
    }

    public Account() {
    }
}
